package day01;

import java.util.Scanner;

public class ZT1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String num = scanner.next();
        StringBuffer num2 = new StringBuffer();
        for (int i = num.length() - 1; i >= 0; i--) {
            num2.append(num.charAt(i));
        }
        System.out.println((Integer.parseInt(num) + Integer.parseInt(num2.toString())));
    }
}
